#coding=utf-8
import datetime
import stutils
stutils.set_django_environ()
from djstock.shstock.models import *

td = datetime.date.today().isoformat()
def change_gte(dt=td, p=8):
    ss = []
    for s in Share.objects.all():

        try:
            e = s.exday_set.get(date=dt)
        except Exday.DoesNotExist:
            continue
        
        price = e.price
        if price.change >= p:
            ss.append(s)

    return ss